<!DOCTYPE html>
<html lang="en">
<head>
<title>WebView4Delphi: uWVTypeLibrary: Interface ICoreWebView2Profile3</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0-snapshot">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<span id="ICoreWebView2Profile3"></span><h1 class="cio">Interface ICoreWebView2Profile3</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></div><div class="one_section">Fields</div><div class="one_section"><a class="section" href="#PasDoc-Methods">Methods</a></div><div class="one_section">Properties</div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="uWVTypeLibrary.html">uWVTypeLibrary</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type ICoreWebView2Profile3 = interface(<a class="normal" href="uWVTypeLibrary.ICoreWebView2Profile2.html">ICoreWebView2Profile2</a>)</code></p>
<h2 class="description">Description</h2>
<p>
 This is an extension of the ICoreWebView2Profile interface to control levels of tracking prevention. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2profile3">https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2profile3</a>&quot;&gt;See the ICoreWebView2Profile3 article.)</p>
<span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">IUnknown</li>
<li class="ancestor"><a class="normal" href="uWVTypeLibrary.ICoreWebView2Profile.html">ICoreWebView2Profile</a></li>
<li class="ancestor"><a class="normal" href="uWVTypeLibrary.ICoreWebView2Profile2.html">ICoreWebView2Profile2</a></li>
<li class="thisitem">ICoreWebView2Profile3</li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Methods"></span><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2Profile3.html#Get_PreferredTrackingPreventionLevel-COREWEBVIEW2_TRACKING_PREVENTION_LEVEL-">Get_PreferredTrackingPreventionLevel</a></strong>(out value: <a href="uWVTypeLibrary.html#COREWEBVIEW2_TRACKING_PREVENTION_LEVEL">COREWEBVIEW2_TRACKING_PREVENTION_LEVEL</a>): HResult; stdcall;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2Profile3.html#Set_PreferredTrackingPreventionLevel-COREWEBVIEW2_TRACKING_PREVENTION_LEVEL-">Set_PreferredTrackingPreventionLevel</a></strong>(value: <a href="uWVTypeLibrary.html#COREWEBVIEW2_TRACKING_PREVENTION_LEVEL">COREWEBVIEW2_TRACKING_PREVENTION_LEVEL</a>): HResult; stdcall;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Get_PreferredTrackingPreventionLevel-COREWEBVIEW2_TRACKING_PREVENTION_LEVEL-"></span><code>function <strong>Get_PreferredTrackingPreventionLevel</strong>(out value: <a href="uWVTypeLibrary.html#COREWEBVIEW2_TRACKING_PREVENTION_LEVEL">COREWEBVIEW2_TRACKING_PREVENTION_LEVEL</a>): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 The `PreferredTrackingPreventionLevel` property allows you to control levels of tracking prevention for WebView2 which are associated with a profile. This level would apply to the context of the profile. That is, all WebView2s sharing the same profile will be affected and also the value is persisted in the user data folder.

<p>See `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL` for descriptions of levels.

<p>If tracking prevention feature is enabled when creating the WebView2 environment, you can also disable tracking prevention later using this property and `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_NONE` value but that doesn't improves runtime performance.

<p>There is `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` property to enable/disable tracking prevention feature for all the WebView2's created in the same environment. If enabled, `PreferredTrackingPreventionLevel` is set to `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BALANCED` by default for all the WebView2's and profiles created in the same environment or is set to the level whatever value was last changed/persisted to the profile. If disabled `PreferredTrackingPreventionLevel` is not respected by WebView2. If `PreferredTrackingPreventionLevel` is set when the feature is disabled, the property value get changed and persisted but it will takes effect only if `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` is true.

<p>See `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` for more details. \snippet SettingsComponent.cpp SetTrackingPreventionLevel </p>
<h6 class="description_section">Attributes</h6>
<dl class="attributes">
  <dt>GUID['{B188E659-5685-4E05-BDBA-FC640E0F1992}']</dt>
  <dd></dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Set_PreferredTrackingPreventionLevel-COREWEBVIEW2_TRACKING_PREVENTION_LEVEL-"></span><code>function <strong>Set_PreferredTrackingPreventionLevel</strong>(value: <a href="uWVTypeLibrary.html#COREWEBVIEW2_TRACKING_PREVENTION_LEVEL">COREWEBVIEW2_TRACKING_PREVENTION_LEVEL</a>): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Set the `PreferredTrackingPreventionLevel` property.

<p>If `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` is false, this property will be changed and persisted to the profile but the WebView2 ignores the level silently. </p>
</td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0-snapshot</a>. </em>
</span>
</body></html>
